<?php
include('lock.php');

$sql = "select event_ID,event_name from events where start_date >= now()";

$result=mysql_query($sql);

?>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title> View Event Location </title>
    </head>
    <body> 
        <img src="/infinity/img/infinity3.jpg" alt="Infinity" width="200" height="100"/>
        <h1>View Available Event List</h1><hr/>
        <div id="layout_1">
            <div id="content" class=".">
                <form action="/infinity/register_user_event.php" method="post"> 
                    <table border="2" cellpadding="3" class="standard">
                        </tr>
                        <tr>
                            <th class="subr">Available Event </th>

                            <td><select multiple size = 5 name="event">
					<?php  
					while ($db_field = mysql_fetch_assoc($result)) {
						$event_id = $db_field['event_ID'];
						$event_name = $db_field['event_name'];
						//$event_name="arif";

					echo '<OPTION VALUE="'.$event_id.'">'.$event_name.'</option>';
					} ?>
					 
			        </select><td>
                        </tr>
                        <tr>
                            <th colspan="2">
				<input type="hidden" name="myusername" value="<?php echo $login_session; ?>"/>
                                <input type="submit" name="action" value="Register" />
                                <font color="White"><a href="/infinity/welcome.php">Back to Welcome Page</a></font>
                            </th>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="cleaner">&nbsp;</div>
        </div>
        </div>
    </body>
</html>
